package com.smart.lx.observer;

import java.util.Observable;

/**
 *观察者
 */
public class Gper extends Observable {

    String SCname;
    public Gper(String SCname) {
        this.SCname = SCname;
    }


    public void SCpublish(Question question){
        System.out.println("学员[ " +this.SCname +" ]提交了一个问题,主题是："+question.getName()+"，问题内容是：" + question.getContent());
        setChanged(); //父类方法, 标记变化;
        notifyObservers(question); //父类方法, 发送通知
    }





}
